﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true" CodeFile="Search-Contract.aspx.cs" Inherits="Search_Contract" %>

<%@ Register Assembly="obout_Calendar2_Net" Namespace="OboutInc.Calendar2" TagPrefix="obout" %>

<%@ Register Assembly="obout_ComboBox" Namespace="Obout.ComboBox" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<div>
    <asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Size="Large" 
                    Text="Danh Sách Hợp Đồng"  ></asp:Label>
</div>


<div>
    <asp:Table runat="server" >

    <asp:TableRow>
            <asp:TableCell HorizontalAlign="Left" runat="server">
                <asp:Label ID="lblContractDate_Start" runat="server" Text="Được ký trước ngày:"></asp:Label>
            </asp:TableCell>

            <asp:TableCell HorizontalAlign="Right" runat="server">
                <asp:TextBox ID="tbxContractDate_Start" runat="server" CssClass="text-input" ReadOnly="true"></asp:TextBox>
            </asp:TableCell>                

             <asp:TableCell HorizontalAlign="Justify" runat="server">
                 <obout:Calendar ID="Calendar1" runat="server" 
								            StyleFolder="Calenderstyles/default" 
								            DatePickerMode="true"
								            TextBoxId="tbxContractDate_Start"                      
								            DatePickerImagePath ="Calenderstyles/date_picker2.gif"/>
            </asp:TableCell>

            <asp:TableCell HorizontalAlign="Left" runat="server">
                <asp:Label ID="lblContractDate_End" runat="server" Text="Được ký sau ngày: "></asp:Label>
            </asp:TableCell>

             <asp:TableCell>
                <asp:TextBox ID="tbxContractDate_End" runat="server" CssClass="text-input" ReadOnly="true" ></asp:TextBox>                 
            </asp:TableCell>                

             <asp:TableCell HorizontalAlign="Left" runat="server" >
                 <obout:Calendar ID="Calendar2" runat="server" 
								            StyleFolder="Calenderstyles/default" 
								            DatePickerMode="true"
								            TextBoxId="tbxContractDate_End"                      
								            DatePickerImagePath ="Calenderstyles/date_picker2.gif"/>
            </asp:TableCell>

        </asp:TableRow>
        
        <asp:TableRow>
            <asp:TableCell>
                <asp:Label ID="lblContractNumber" runat="server" Text="Hợp Đồng Số: "></asp:Label>
            </asp:TableCell>

            <asp:TableCell>
                <cc1:ComboBox ID="cboContractNumber" runat="server" DataTextField="ContractNumber" DataValueField="ContractNumber" >
                </cc1:ComboBox>
            </asp:TableCell>
            
            <asp:TableCell>
                <asp:Label ID="lblTutorName" runat="server" Text="Tên Gia Sư: "></asp:Label>
            </asp:TableCell>

            <asp:TableCell>
                <cc1:ComboBox ID="cboTutorName" runat="server" DataTextField="TutorName" DataValueField="TutorName" >
                </cc1:ComboBox>
            </asp:TableCell>

            <asp:TableCell>
                <asp:Label ID="lblCusName" runat="server" Text="Tên Khách Hàng: "></asp:Label>
            </asp:TableCell>

            <asp:TableCell>
                <cc1:ComboBox ID="cboCusName" runat="server" DataTextField="CustomerName" DataValueField = "CustomerName" >
                </cc1:ComboBox>
            </asp:TableCell>
        </asp:TableRow>

        <asp:TableRow>
            <asp:TableCell>
                <asp:Label ID="lblPrice_Start" runat="server" Text="Giá trị lớn hơn: "></asp:Label>
            </asp:TableCell>

            <asp:TableCell>
                  <asp:TextBox ID="tbxPrice_Start" runat="server" CssClass="text-input" ></asp:TextBox>  
            </asp:TableCell>

            <asp:TableCell>
            </asp:TableCell>

            <asp:TableCell>
                <asp:Label ID="lblPrice_End" runat="server" Text="Giá trị nhỏ hơn: "></asp:Label>
            </asp:TableCell>
                        
            <asp:TableCell>
                <asp:TextBox ID="tbxPrice_End" runat="server" CssClass="text-input" ></asp:TextBox>  
            </asp:TableCell>
                        
            <asp:TableCell>
            </asp:TableCell>
        </asp:TableRow>

        <asp:TableRow>
            <asp:TableCell>
                <asp:Label ID="lblSubject" runat="server" Text="Môn học"></asp:Label>
            </asp:TableCell>                
            <asp:TableCell>
                <asp:TextBox ID="tbxSubjects" runat="server" CssClass="text-input" ></asp:TextBox>    
            </asp:TableCell>

            <asp:TableCell>
            </asp:TableCell>

            <asp:TableCell>
                <asp:Label ID="lblStatus" runat="server" Text="Trạng Thái"></asp:Label>
            </asp:TableCell>                        
            <asp:TableCell>
                <cc1:ComboBox ID="cboStatus" runat="server" DataTextField="Status" DataValueField = "Status" >
                </cc1:ComboBox>
            </asp:TableCell>
                        
            <asp:TableCell>
            </asp:TableCell>
        </asp:TableRow>
    </asp:Table>

    <asp:Button ID="btnSearch" runat="server" Text="Tìm Kiếm" CssClass="button" 
        onclick="btnSearch_Click"/>

</div>
<br/>
<div>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" >
    <Columns>
             <asp:TemplateField HeaderText="Hợp Đồng Số" SortExpression= "ContractNumber" >    
                <ItemTemplate  >
                        <a href='/Contract.aspx?id=<%# Eval("ID") %>'><%# Eval("ContractNumber")%></a>                        
                </ItemTemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText="Gia Sư" SortExpression= "TutorName" >    
                <ItemTemplate  >
                        <a href='/Tutor-Profile.aspx?id=<%# Eval("TutorID") %>'><%# Eval("TutorName")%></a>                        
                </ItemTemplate>
            </asp:TemplateField>
                            
            <asp:TemplateField HeaderText="Khách Hàng" SortExpression= "CustomerName" >    
                <ItemTemplate  >
                        <a href='/Customer-Profile.aspx?id=<%# Eval("CusID") %>'><%# Eval("CustomerName")%></a>                        
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Status" HeaderText="Tình trạng" SortExpression="Status" />
    </Columns>
    </asp:GridView>
</div>
</asp:Content>

